package com.ctshk.rpc.order.goods.service;

import com.ctshk.common.dto.Result;
import com.ctshk.common.model.PageResponse;
import com.ctshk.rpc.order.goods.dto.ShopOrderEsDTO;
import com.ctshk.rpc.order.goods.dto.ShoppingShopStoreDTO;
import com.ctshk.rpc.order.goods.dto.StoreShopDTO;
import com.ctshk.rpc.order.goods.req.ShopCustomerOrderReq;
import com.ctshk.rpc.order.goods.req.ShoppingShopStoreAddReq;
import com.ctshk.rpc.order.goods.req.ShoppingShopStorePageReq;

import java.util.Map;

/**
 * <p>
 * 小店管理--服务类
 * </p>
 *
 * @author 黄利斌
 * @date 2021/6/1 4:19 下午
 */
public interface IShoppingShopStoreService {
    /**
     * 根据邀请码获取小店来源
     * @param code
     * @param name
     * @return
     */
    Result<Map<String, Object>> invitation(String code, String name);

    /**
     * C端--开通成员小店
     * @param req
     * @param userId
     * @param shoppingShopStoreDTO
     * @return
     */
    void staff(ShoppingShopStoreAddReq req, Long userId,ShoppingShopStoreDTO shoppingShopStoreDTO);

    /**
     * C端--后台编辑小店
     * @param obj
     * @param shoppingShopStoreDTO
     */
    void updateShoppingShopStore(ShoppingShopStoreAddReq obj,ShoppingShopStoreDTO shoppingShopStoreDTO);

    /**
     * 分页查询成员小店列表
     * @param currentUser
     * @param pageReq
     * @return
     */
    Result<PageResponse<ShoppingShopStoreDTO>> findShoppingShopStoreByCondition(ShoppingShopStorePageReq pageReq,ShoppingShopStoreDTO shoppingShopStoreDTO);

    /**
     * 根据id查询小店信息
     * @param id
     * @return
     */
    Result<ShoppingShopStoreDTO> info(Long id,ShoppingShopStoreDTO shoppingShopStoreDTO);

    /**
     * 获取验证码
     * @param contactMobileAreaCode
     * @param contactNumber
     * @param type 验证码类型 1.登录验证码,2.注册验证码,3.修改手机验证码，4.忘记密码验证码,5.修改密码验证码
     */
    Result sendSmsCaptcha(String contactMobileAreaCode, String contactNumber, Integer type, Long userId);

    /**
     * 小店id获取--销售金额、订单数、客户数
     * @param id
     * @param type
     * @return
     */
    Result<StoreShopDTO> show(Long id,Integer type,ShoppingShopStoreDTO shoppingShopStoreDTO);

    /**
     * 根据订单号或者订单状态查询小店客户订单
     * @param req
     * @param shoppingShopStoreDTO
     * @return
     */
    Result<PageResponse<ShopOrderEsDTO>> customerOrder(ShopCustomerOrderReq req,ShoppingShopStoreDTO shoppingShopStoreDTO);
}
